
varying vec3 oTexCoord;

uniform sampler2D gSampler;
uniform bool bSample;
uniform vec3 col;
void main()
{
	vec4 outColor;
	if (bSample)
	{
		// texture sampling enabled
		outColor = texture2D(gSampler, oTexCoord.xy);
	}
	else
	{
		outColor = vec4(col, 1.0);
	}
	
	gl_FragColor = outColor;
	
}